Due Feb 24, 2:59 AM EST
Suppose we have 40 videos in our dataset. Each video falls in at least one of the two categories, comedy videos and music videos. It is known that there are 27 comedy videos and 22 music videos in the dataset. How many videos fall into both categories?
This is correct! Indeed, we can denote by A the set of all comedy videos and denote by B the set of all music videos. Then since each video falls in at least one of the categories the union A∪B consists of all videos in the dataset. On the other hand, the intersection A∩B consists of videos that fall into both categories. Now, we know from the previous video that the following relation between the sizes of the sets holds : ∣A∪B∣=∣A∣+∣B∣−∣A∩B∣. We also know that ∣A∣=27, ∣B∣=22 and ∣A∪B∣=40. Overall we can conclude that ∣A∩B∣=∣A∣+∣B∣−∣A∪B∣=27+22−40=9.
How many integer numbers from 1 to 1000 are divisible by 2 or by 3?
This is correct! Indeed, we can use the generalized version of rule of sum here. Let A be the set of all numbers from 1 to 1000 divisible by 2 and B be the set of all numbers from 1 to 1000 that are divisible by 3. Then A∪B is the set of numbers that are divisible by 2 or by 3. And the set A∩B is the set of numbers that are divisible by 2 and by 3. These are exactly the numbers that are divisible by 6. Now, note that ∣A∣=500 since every other number from 1 to 1000 is divisible by 2. Also ∣B∣=333, since the numbers divisible by 3 are 3, 6, 9, 12 and so on till 999. So every third number from 1 to 999 is divisible by 3. Finally, ∣A∩B∣=166 since the numbers divisible by 6 are 6, 12, 18, 24, 30 and so on till 996. So every 6-th number from 1 to 996 is divisible by 6. So it remains now to apply the formula that we showed in the previous video: ∣A∪B∣=∣A∣+∣B∣−∣A∩B∣=500+333–166=667.
How many integer numbers from 1 to 1000 are not divisible neither by 2, nor by 3?
This is correct! Indeed, the requirement in this problem is exactly the opposite to the requirement of the previous problems. So to count them we can subtract the number of all numbers from the previous problem from the number of all numbers from 1 to 1000. So the answer is 1000-667=333.